"""
此py文件是为了
2024年4月3日18:40:48
"""

from MyDataSet import FluoDataType
import os

"""
扫描一个路径下的所有目录文件的excel，并且将画成荧光图
"""
def draw_all_pic(dir_path = r"Data\2024.4.9", save_dir = ".\\Data\\Picture"):
    dir_list = os.listdir(dir_path)
    for dir_name in dir_list:
        if dir_name == "background.xlsx":
            continue
        else:
            name_list = os.listdir(os.path.join(dir_path,dir_name))
            for name in name_list:
                FluoData = FluoDataType(os.path.join(dir_path, dir_name, name), os.path.join(dir_path,"background.xlsx"))
                FluoData.draw_countour(name[:-5], save_path = os.path.join(save_dir,name[:-5]))

draw_all_pic(r"Data\2024.3.6", save_dir = ".\\Data\\Picture\\new1")
draw_all_pic(r"Data\2024.4.9", save_dir = ".\\Data\\Picture\\new1")
draw_all_pic(r"Data\2024.4.15", save_dir = ".\\Data\\Picture\\new1")
draw_all_pic(r"Data\2024.4.17", save_dir = ".\\Data\\Picture\\new1")
